<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>定位</title>
  <style>
    .box{
      width: 500px;
      height: 500px;
      border: 2px solid #000;
    }
    .child{
      width: 100px;
      height: 100px;
      background: red;
      /* display: inline; */
      display: inline-block;
    }
    .child2{
      width: 50px;
      height: 50px;
      background: green;
      display: block;
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="child"></div>
    <div class="child"></div>

    <span class="child2">hello</span>
    <span class="child2">world</span>

  </div>
</body>
</html>